Add zizmor security scanner to pre-commit#301
Open
hugovk wants to merge 5 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #301 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 535 535
Branches 100 100
=========================================
Hits 535 535 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tomli got a mention in this blogpost (and presumably PyCon US talk) for being a high-download package that doesn't use Trusted Publishing:
https://nesbitt.io/2026/05/25/github-actions-security-in-python-packages.html
Trusted Publishing is a way to use short-lived tokens for upload, instead of a long-lived token in the repo secrets.
I recommend setting up Trusted Publishing, it can help guard against supply chain attacks, and we've seen many in the past couple of months (the blog post mentions a bunch).
Here's how to set it up:
https://docs.pypi.org/trusted-publishers/
I'm happy to help out.
I also recommend using the zizmor security linter for GitHub Actions. It flags many of the insecure things in GHA that have caused recent malicious takeovers.
I've put it into pre-commit here, and fixed all the findings; except added an ignore for Trusted Publishing to the config for now.